package com.firechat.webclient.util;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.IContext;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;

import java.io.Writer;

public class ThymeleafUtil {
    private static final TemplateEngine engine;
    static {
        engine = new TemplateEngine();
        ClassLoaderTemplateResolver resolver = new ClassLoaderTemplateResolver();
        engine.setTemplateResolver(resolver);
    }
    public  static void process(String template, IContext context, Writer writer){
        engine.process(template,context,writer);
    }
}
